﻿<local:SolidColorBrushDialog 
    x:Class="Imagin.Controls.Extended.ColorDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:Imagin.Controls.Extended"
    xmlns:Controls.Common="http://imagin.tech/imagin/controls/common"
    xmlns:Common.Data.Converters="clr-namespace:Imagin.Common.Data.Converters;assembly=Imagin.Common"
    ResizeMode="NoResize"
    SizeToContent="WidthAndHeight"
    Type="Tool"
    WindowStartupLocation="CenterScreen">
    <local:SolidColorBrushDialog.Resources>
        <Common.Data.Converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter"/>
    </local:SolidColorBrushDialog.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <local:ColorPicker 
            x:Name="PART_ColorPicker"
            SelectedColorChanged="OnSelectedColorChanged"/>
        <Border
            Grid.Row="1" 
            Style="{Binding FooterStyle}">
            <StackPanel 
                Controls.Common:PanelExtensions.Spacing="3,0,0,0"
                Orientation="Horizontal" 
                HorizontalAlignment="Right">
                <Button 
                    Content="Revert" 
                    Click="OnRevert"/>
                <Button 
                    Name="btOk" 
                    Content="Save" 
                    IsDefault="True" 
                    Click="OnSave"/>
                <Button 
                    Name="btCancel" 
                    Content="Cancel" 
                    IsCancel="True" 
                    Click="OnCancel"/>
            </StackPanel>
        </Border>
    </Grid>
</local:SolidColorBrushDialog>
